package com.beans;

import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Creat with IntelliJ IDEA
 * Description:
 * User:WZW
 * Date:2022-08-10
 * Time:21:37
 */
@Component
public class UserBean {
    @Bean(name =  {"user", "userInfo"})
    public User user1() {
        User user = new User();
        user.setId(1);
        user.setName("张三");
        return user;
    }
    public void sayHi() {
        System.out.println("UserBean");
    }
}
